<%@ page contentType="text/html; charset=UTF-8"%>
<%@include file="../../common/taglibs.jsp"%>
<script type="text/javascript">
    $(document).ready(function () {
        /**
         * 进行校核绑定
         */
        $('#projectEditForm input').each(function () {
            if ($(this).attr('required') || $(this).attr('validType')) {
                $(this).validatebox();
            }
        });

        $('#formProjectbutton').click(function() {
            if (!$("#projectEditForm").form('validate')) {
                return;
            }

            //提交表单
            saveAjaxData("${ctx}/project/save.do", "projectEditForm", "projectWindow", "projectGrid");
        });

        $("#editTable tr:odd").addClass("cssline_1");
    });


</script>

<div>
    <form:form id="projectEditForm" name="projectEditForm" action="${ctx}/project/save.do" method="post" >
        <input type="hidden" name="id" value="${bean.id}" />
        <div>
            <table border="0" cellspacing="1" width="100%" id="editTable">
                <tr class="cssline">
                    <td  class="csslabel_15">
                        项目名称:
                    </td>
                    <td colspan="3" class="container">
                        <input type="text" name="name" value="${bean.name}"  required="true" class="input_table" maxlength="50"/>&nbsp;
                    </td>
                </tr>
                <tr class="cssline">
                    <td  class="csslabel_15">
                        项目编号:
                    </td>
                    <td>
                        <input type="text" name="code" value="${bean.code}"  required="true" class="input_table" maxlength="50"/>&nbsp;
                    </td>
                    <td  class="csslabel_15">
                        项目类型:
                    </td>
                    <td>
                        <input type="text"
                                     class="easyui-combobox"
                                     name="type"
                                     url="${ctx}/sysCode/getCodeDetailList.do?code=PROJECT_TYPE"
                                     valueField="id"
                                     textField="name"
                                     panelHeight="auto"
                                     value="${bean.type.id}"/>&nbsp;
                    </td>
                </tr>
                <tr class="cssline">
                    <td  class="csslabel_15">
                        原稿名称:
                    </td>
                    <td colspan="3">
                        <input type="text" name="sourceName" value="${bean.sourceName}"  class="input_table"/>&nbsp;
                    </td>
                </tr>
                <tr class="cssline">
                    <td  class="csslabel_15">
                        原语言:
                    </td>
                    <td>
                        <input type="text"
                               class="easyui-combobox"
                               name="souceLanguage"
                               url="${ctx}/sysCode/getCodeDetailList.do?code=LANGUAGE"
                               valueField="id"
                               textField="name"
                               panelHeight="auto"
                               value="${bean.souceLanguage.id}"/>&nbsp;
                    </td>
                    <td  class="csslabel_15">
                        目标语言:
                    </td>
                    <td>
                        <input type="text"
                               class="easyui-combobox"
                               name="targetLanguage"
                               url="${ctx}/sysCode/getCodeDetailList.do?code=LANGUAGE"
                               valueField="id"
                               textField="name"
                               panelHeight="auto"
                               value="${bean.targetLanguage.id}"/>&nbsp;
                    </td>
                </tr>
                <tr class="cssline">
                    <td  class="csslabel_15">
                        翻译字数(个):
                    </td>
                    <td colspan="3">
                        <input type="text" name="wordCount" value="${bean.wordCount}"  class="input_table" validType="number(0)"/>&nbsp;
                    </td>
                </tr>
                <tr class="cssline">
                    <td  class="csslabel_15">
                        开始时间:
                    </td>
                    <td>
                        <input type="text" name="startDate" class="Wdate" value="${bean.startDate}" onFocus="WdatePicker({isShowClear:false,readOnly:true})" />&nbsp;
                    </td>
                    <td  class="csslabel_15">
                        结束时间:
                    </td>
                    <td>
                        <input type="text" name="endDate" class="Wdate" value="${bean.endDate}" onFocus="WdatePicker({isShowClear:false,readOnly:true})" />&nbsp;
                    </td>
                </tr>
                <tr class="cssline">
                    <td  class="csslabel_15">
                        要求:
                    </td>
                    <td colspan="3">
                        <textarea type="textarea" name="requirement"   rows="3" cols="55" >${bean.requirement}</textarea>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" valign="middle" align="center">
                        <input type="button" id="formProjectbutton" value="确定" class="btn_Ok">&nbsp;
                        <input type="button" value="取消" class="btn_Del" onclick="closeWindow('projectWindow')">
                    </td>
                </tr>
            </table>
            <iframe border="0" src="${ctx}/document/fileList.do?docId=${bean.doc.id}" style="width: 99%; height:280px"/>
        </div>
    </form:form>
</div>